type myTypes={
    name:string,
    age:number

}
interface myTypes{
    name:string,
    age:number,
    sayH():void
}


let obj1:myTypes
obj1={name:'lu',age:2}
class Hyp implements myTypes{
    name:string
    age:number
    sex:number
    constructor(name:string,age:number,sex:number){
        this.name=name
        this.age=age
        this.sex=sex
    }
    sayH(){
        console.log('nihao'); 
        
    } 
}

const obj2=new Hyp('hyp',1,2)

